{\rtf1\ansi\ansicpg936\cocoartf1404\cocoasubrtf130
{\fonttbl\f0\fnil\fcharset134 STHeitiSC-Light;\f1\fnil\fcharset0 Menlo-Regular;\f2\fnil\fcharset134 PingFangSC-Regular;
}
{\colortbl;\red255\green255\blue255;\red170\green13\blue145;\red92\green38\blue153;\red46\green13\blue110;
\red28\green0\blue207;\red196\green26\blue22;\red0\green116\blue0;}
\paperw11900\paperh16840\margl1440\margr1440\vieww19020\viewh13800\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0\fs44 \cf0   1. UIButton  \'b0\'b4\'c5\'a5\
	
\f1 \cf2 \CocoaLigature0 let\cf0  button = \cf3 UIButton\cf0 ()\
\pard\tx1059\pardeftab1059\pardirnatural\partightenfactor0
\cf0   button.\cf3 frame\cf0  = \cf4 CGRectMake\cf0 (\cf5 50\cf0 , \cf5 50\cf0 , \cf5 100\cf0 , \cf5 100\cf0 )\
  button.\cf3 backgroundColor\cf0  = \cf3 UIColor\cf0 .\cf4 cyanColor\cf0 ()\
  \cf2 self\cf0 .\cf3 view\cf0 .\cf4 addSubview\cf0 (button)\
  
\f2 \'b0\'b4\'c5\'a5\'b0\'f3\'b6\'a8\'b5\'e3\'bb\'f7\'ca\'c2\'bc\'fe
\f1 :\
	button.\cf4 addTarget\cf0 (\cf2 self\cf0 , action: \cf3 Selector\cf0 (\cf6 "buttonClick"\cf0 ), forControlEvents:.TouchUpInside )\
  
\f2 \'ca\'b5\'cf\'d6\'b7\'bd\'b7\'a8
\f1 :\
	\cf2 func\cf0  buttonClick()\
    \{\
        \cf4 print\cf0 (\cf6 "
\f2 \'d5\'e2\'ca\'c7\'b0\'b4\'c5\'a5\'b5\'e3\'bb\'f7\'ca\'c2\'bc\'fe
\f1 "\cf0 )\
    \}\
  
\f2 \'c9\'e8\'d6\'c3\'b1\'ea\'cc\'e2
\f1 :	\
	button.\cf4 setTitle\cf0 (\cf6 "
\f2 \'d5\'e2\'b8\'f6\'d2\'bb\'b8\'f6\'b0\'b4\'c5\'a5
\f1 "\cf0 , forState: .Normal)\
\
 2. UIImageView  \
	\cf2 let\cf0  imageView = \cf3 UIImageView\cf0 ()\
        imageView.\cf3 frame\cf0  = \cf4 CGRectMake\cf0 (\cf5 50\cf0 , \cf5 180\cf0 , \cf5 100\cf0 , \cf5 100\cf0 )\
        imageView.\cf3 image\cf0  = \cf3 UIImage\cf0 (named: \cf6 "1.png"\cf0 )\
        \cf2 self\cf0 .\cf3 view\cf0 .\cf4 addSubview\cf0 (imageView)\
\
 3. UITextField\
	\cf7 // 
\f2 \'cc\'ed\'bc\'d3\'d2\'bb\'b8\'f6
\f1 textField\
\cf0         \cf2 let\cf0  texF = \cf3 UITextField\cf0 ()\
        texF.\cf3 frame\cf0  = \cf4 CGRectMake\cf0 (\cf5 100\cf0 ,\cf5 300\cf0 , \cf5 200\cf0 , \cf5 50\cf0 )\
        texF.\cf3 alpha\cf0  = \cf5 0.5\cf0 ;\
        texF.\cf3 backgroundColor\cf0  = \cf3 UIColor\cf0 .\cf4 lightGrayColor\cf0 ()\
        texF.\cf3 layer\cf0 .\cf3 cornerRadius\cf0  = \cf5 5\cf0 \
        texF.\cf3 text\cf0  = \cf6 "
\f2 \'bd\'f1\'cc\'ec\'ca\'c7\'d6\'dc\'b6\'fe
\f1 "\cf0 \
        \cf2 self\cf0 .\cf3 view\cf0 .\cf4 addSubview\cf0 (texF)\
  3.1 
\f2 \'d6\'d8\'d0\'b4touch\'ca\'c2\'bc\'fe: \'d7\'a2\'d2\'e2: Swift\'d6\'d0\'b5\'c4bool\'d6\'b5\'d6\'bb\'c4\'dc\'ce\'aatrue\'bb\'f2false\
	
\f1 \cf2 override\cf0  \cf2 func\cf0  touchesBegan(touches: \cf3 Set\cf0 <\cf3 UITouch\cf0 >, withEvent event: \cf3 UIEvent\cf0 ?) \{\
        \cf2 self\cf0 .\cf3 view\cf0 .\cf4 endEditing\cf0 (\cf2 true\cf0 )\
    \}\
  \
  \
  3.2 
\f2 UILabel\
	
\f1 \cf7 // 
\f2 \'cc\'ed\'bc\'d3\'d2\'bb\'b8\'f6\'b1\'ea\'c7\'a9
\f1 \
\cf0         \cf2 let\cf0  label = \cf3 UILabel\cf0 ()\
        label.\cf3 text\cf0  = \cf6 "
\f2 \'d5\'e2\'ca\'c7\'d2\'bb\'b8\'f6\'b1\'ea\'c7\'a9
\f1 "\cf0 \
        label.\cf3 frame\cf0  = \cf4 CGRectMake\cf0 (\cf5 100\cf0 , \cf5 150\cf0 , \cf5 200\cf0 , \cf5 50\cf0 )\
        \cf2 self\cf0 .\cf3 view\cf0 .\cf4 addSubview\cf0 (label)\
\
\
\
\
,,,\
\
\
\
\
\
\
\
\
\
\
\
\
\
}